﻿#ifndef EXAMDIALOG_H
#define EXAMDIALOG_H
#include <QDialog>
#include <QTimer>
#include <QTextEdit>
#include <QGridLayout>
#include <QVector>
#include <QLabel>
#include <QButtonGroup>
#include <QRadioButton>
#include <QCheckBox>
#include "answeritem.h"

class ExamDialog : public QDialog
{
    Q_OBJECT
public:
    ExamDialog(QWidget*parent = 0);
    ~ExamDialog();


private:
    void initTimer();
    void initLayout();
    bool initTextEdit();
    void initButtons();

private slots:
    void updateTime();
    void getScore();



private:
    QTimer *m_timer;
    unsigned long m_timeGo;

    QTextEdit *m_textEdit;
    QGridLayout *m_layout;


    QVector <QButtonGroup*>m_btnGroups;
    QVector<answeritem*> m_items;//存放  一道道题库

    int m_items_per_line;//一行显示多少道题

};

#endif // EXAMDIALOG_H
